/**
 * created by zhangjinshun
 * 请求头
 */
package com.admin.core;


import com.tiangong.framework.bo.AbstractToken;
import com.tiangong.framework.bo.AbstractReturn;
import com.tiangong.framework.bo.CDO;
import com.tiangong.framework.bo.Return;
import lombok.Data;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

import javax.servlet.http.HttpServletRequest;

@Data
@Component
public class Token extends AbstractToken {

    @Override
    public AbstractReturn parse(HttpServletRequest request, CDO cdoRequest) {
        //从header中取值，转化后然后放到cdoRequest中
        //String token = request.getHeader("token");
        cdoRequest.set("token","aaaa");
        return Return.SUCCESS;
    }
}
